import config from 'config';
import httpFetch from 'share/httpFetch';
import errorMessage from 'share/errorMessage';

export default {
  //获取设置
  getSetting() {
    return httpFetch.get(config.baseUrl + '/api/thirdParty/option')
      .catch((err) => {
        errorMessage(err.response);
        throw(err);
      });
  },
  saveSetting(params) {
    return httpFetch.post(config.baseUrl + '/api/thirdParty/option', params)
      .catch((err) => {
        errorMessage(err.response);
        throw(err);
      });
  },
}
